
package com.probiz.estore.eai.customerclass;

import java.util.List;

import com.probiz.estore.customer.service.MembershipManager;
import com.probiz.estore.eai.common.GenericUnmarshaller;
import com.probiz.estore.eai.customerclass.generated.CustomerClass;
import com.probiz.estore.eai.customerclass.generated.CustomerClassSet;


public class CustomerClassUnmarshaller extends
		GenericUnmarshaller<CustomerClassSet> {
	MembershipManager  membershipManager=null;
	
	public void setMembershipManager(MembershipManager membershipManager) {
		this.membershipManager = membershipManager;
	}

	@Override
	public void startUnmarshal() throws Exception {
		CustomerClassSet customerClassSet = this.getEntitySet();
		List<CustomerClass> customerClassList=customerClassSet.getCustomerclass();
		logger.debug("customerClassList size="+customerClassList.size());
		membershipManager.doImportMebershipsForEai(customerClassList);
	}


}
